﻿using System;
using Detective.Game;
using Detective.World;

namespace Detective.Components.Base
{
    public abstract class BaseComponent : IGameComponent
    {
        #region Fields

        private GameTime
            _lastDelay;

        #endregion

        public GameTime GetLastDelay()
        {
            return _lastDelay;
        }

        public void Delay(GameTime gameTime)
        {
            _lastDelay = gameTime;

            OnDelay(gameTime);
        }

        public abstract int GetDelayMilliSeconds();

        protected abstract void OnDelay(GameTime gameTime);
    }
}
